

<%@page contentType="text/html" pageEncoding="UTF-8" import="java.util.List,com.model.Guess"%>

<div id="container">

    <jsp:include page = "header.jsp" />

    <div id ="content">

        <h1>All  Guess's </h1>

        <% List<Guess> allGuessList = (List<Guess>) request.getAttribute("AllGuessList");

        String message = "No Guess's have been created";
        if (allGuessList.isEmpty()) {%>

        <font style="color:red">

            <p><%=message%></p>

        </font>


        <%}
        %>


        <%  for (Guess guess : allGuessList) {

        %>

        <table align="center" class="table_format"  cellpadding="15" cellspacing="15">

            <tr>
                <th>Guess Category</th>
                <td><%=guess.getGuessCategory()%></td>
            </tr>

            <tr>
                <th>Guess</th>
                <td><%=guess.getGuessContent()%></td>
            </tr>

            <tr>
                <th>Guess Created By</th>
                <td><%=guess.getGuessCreatedBy()%></td>

            </tr>

            <tr>
                <th>Guess Created Date</th>

                <td><%=guess.getCurrentDateTime()%></td>
            </tr>

            <tr>
                <th>Guess Expires On</th>
                <td><%=guess.getGuessExpiryDate()%></td>

            </tr>



        </table>

        <%  }

        %>
    </div>


    <jsp:include page= "footer.jsp" />

</div>